package learner.hmm;

import static org.junit.Assert.*;
import static org.junit.Assert.fail;

import java.util.List;

import junit.framework.Assert;

import learner.Pattern;
import learner.PatternReader;

import org.junit.Test;

public class TestMovementStatistics {

	@Test
	public void test() {
		PatternReader reader = new PatternReader();
		List<Pattern> patterns = reader.givePatterns(1);
		MovementStats statistics = new MovementStats(patterns);
		double sumFrequencies = 0.0;
		for (Double relativeFrequency : statistics.getRelativeFreqMovements().values())
			sumFrequencies += relativeFrequency;
		assertTrue(Math.abs(sumFrequencies - 1) < 0.00000001);
	}

}
